package org.test4j.integration.spring;

import org.test4j.integration.spring.faker.FakeAutowiredAnnotationBeanPostProcessor;
import org.test4j.integration.spring.faker.FakeReferenceAnnotationBeanPostProcessor;
import org.test4j.integration.spring.faker.FakeReferenceBean;
import org.test4j.mock.faking.util.ClassLoad;
import org.test4j.mock.startup.IStartupMock;

public class SpringStartup implements IStartupMock {
    public static final String AutowiredAnnotationBeanPostProcessor_Name = "org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor";

    public static final String ReferenceBean_Name = "org.apache.dubbo.config.spring.ReferenceBean";

    public static final String ReferenceAnnotationBeanPostProcessor_Name = "org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor";

    @Override
    public void initial() {
        if (ClassLoad.isInClasspath(AutowiredAnnotationBeanPostProcessor_Name)) {
            new FakeAutowiredAnnotationBeanPostProcessor();
        }
        if (ClassLoad.isInClasspath(ReferenceAnnotationBeanPostProcessor_Name)) {
            new FakeReferenceAnnotationBeanPostProcessor();
        }
//        if (ClassLoad.isInClasspath(ReferenceBean_Name)) {
//            new FakeReferenceBean();
//        }
    }
}